// 根据选中的表格里的行，拿出需要用到的字段


export default function(field, all) {

    let {selectedRows} = this.state;
    let result = [];

    selectedRows.map((item) => {
        result.push(item.data.values[field].value);
    });

    if(all && selectedRows.length === 0) {
        // result = this.state.mainTableData.allpks;
        if (this.state.mainTableData && this.state.mainTableData.rows) {
            result = this.state.mainTableData.rows.map(item => item.values.pk_psnjob.value);
        }
    }

    return result;
}
